//
//  GameLayer.h
//  newFinding
//
//  Created by Shin Stupid on 7/31/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "CCMyLayer.h"
#import "Little.h"

typedef enum {
	NONE			= 0,
	UP				= 1,
	DOWN			= 2,
	LEFT			= 3,
	RIGHT			= 4
} ShuffleMove;

@interface GameLayer : CCMyLayer<LittleTouchDelegate>
{
    CGFloat tileWidth;
    CGFloat tileHeight;
    CGPoint blankPosition;
    
    Little *littleImage;
    NSMutableArray *lits;
    Little * currentlittle;
    
    CGPoint po;
    int littleLevel;
}

@property (nonatomic, retain) CCLabelTTF *labText;
@property (nonatomic, retain) Little *littleImage;
@property (nonatomic, retain) NSMutableArray *lits;
-   (void)drawImg;
-   (void)initPuzzle;
+   (GameLayer*)getGameLayerInstance;
-   (void) movePiece:(Little *) tile withAnimation:(BOOL) animate;
-   (void) shuffle;
-   (void) movePiece:(Little *) lit inDirectionX:(NSInteger) dx inDirectionY:(NSInteger) dy withAnimation:(BOOL) animate;
-   (ShuffleMove) validMove:(Little *) lit;
-   (BOOL)checkDone:(NSArray *) array;
@end
